package ro.gateway.aida.fnd;

import java.util.Enumeration;
import java.util.Hashtable;

import ro.gateway.aida.obj.AIDAActivityObject;



/**
 * <p>Title: Romanian AIDA</p>
 * <p>Description: :D application</p>
 * <p>Copyright: Copyright (comparator) 2003</p>
 * <p>Company: Romania Development Gateway </p>
 * @author Mihai Popoaei, mihai_popoaei@yahoo.com, smike@intellisource.ro
 * @version 1.0-* @version $Id: FundingStatus.java,v 1.1 2004/10/24 23:37:13 mihaipostelnicu Exp $
 * @deprecated
 */
public class FundingStatus extends AIDAActivityObject
{
      private long id = -1;
      private Hashtable s_names;
      private String harm_code;

      public FundingStatus()
      {
            super();
            this.s_names = new Hashtable();
      }

      public void setHarm_code( String harm_code )
      {
            this.harm_code = harm_code;
      }

      public void setS_names( Hashtable s_names )
      {
            this.s_names = s_names;
      }

      public void setId( long id )
      {
            this.id = id;
      }

      public String getHarm_code()
      {
            return harm_code;
      }

      public Hashtable getS_names()
      {
            return s_names;
      }

      public long getId()
      {
            return id;
      }

      public String getName( String lang )
      {
            if ( lang == null )
            {
                  return null;
            }

            return ( String ) s_names.get( lang );
      }

      public void setName( String lang, String name )
      {
            if ( lang == null )
            {
                  return;
            }

            if ( name != null )
            {
                  this.s_names.put( lang, name );
            }
            else
            {
                  this.s_names.remove( lang );
            }
      }

      public String[] getAvailableLangs()
      {
            if ( s_names.size() < 1 )
                  return null;

            String[] result = new String[ s_names.size() ];
            Enumeration en = s_names.keys();
            int i = 0;
            while ( en.hasMoreElements() )
            {
                  result[ i++ ] = ( String ) en.nextElement();
            }

            return result;
      }
}
